package com.amigo.online.provider.manager.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import com.amigo.online.common.core.mybatis.MyMapper;
import com.amigo.online.provider.manager.model.entity.Comment;
import com.amigo.online.provider.manager.model.entity.Video;

@Mapper
@Component
public interface VideoMapper extends MyMapper<Video> {

    List<Video> findVideoList(Video video);


    List<Video> findRecommendVideoList(Video video);

    Integer saveVideo(Video video);

    Integer deleteVideo(Video video);

    Video getVideo(String video);

    List<Video> findUserVideoList(Video video);


    Integer updateVideo(Video video);

    double getVideoMaximalWeight();//查询视频权重最高的

    List<Comment> getCommentList(@Param("videoId") Long videoId, @Param("startNum") Integer startNum);

    Integer disappearComment(@Param(value = "id") Long id, @Param(value = "status") Integer status);

    Integer getCountByVideoId(@Param(value = "videoId") Long videoId);

}
